package com.sinsz.c.annotation;

import com.sinsz.c.context.BxfsMapperScannerRegister;
import org.mybatis.spring.mapper.MapperFactoryBean;
import org.springframework.beans.factory.support.BeanNameGenerator;
import org.springframework.context.annotation.Import;

import java.lang.annotation.*;

/**
 * 开启mybatis的mapper扫描
 * @author chenjianbo
 * @date 2017/11/24
 */
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
@Documented
@Import(BxfsMapperScannerRegister.class)
public @interface EnableBxfsMapper {

    String[] value() default {"com.sinsz.c.mybatis.mapper"};

    String[] basePackages() default {};

    Class<?>[] basePackageClasses() default {};

    Class<? extends BeanNameGenerator> nameGenerator() default BeanNameGenerator.class;

    Class<? extends Annotation> annotationClass() default Annotation.class;

    Class<?> markerInterface() default Class.class;

    String sqlSessionTemplateRef() default "";

    String sqlSessionFactoryRef() default "sqlSessionFactoryBean";

    Class<? extends MapperFactoryBean> factoryBean() default MapperFactoryBean.class;
}
